The ticketing system allows any visitor to purchase admission tickets without creating an account. The purchase flow is handled byDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Fer-2202/Proyecto_Final/llms.txt
Use this file to discover all available pages before exploring further.
anonymousPurchaseService.js and the POST /api/purchase_orders/anonymous/ endpoint, which creates an order with is_anonymous = true and a unique confirmation code.
Visit dates are informational only. All future dates are valid — there are no hard capacity restrictions. The system creates visit records with
total_slots = 9999 to allow any volume of visitors.Purchase flow
Select a visit date
The visitor picks any future date from the calendar. The frontend calls
createOrGetVisit(date) to register the date and receive a visit_id. If the backend is unreachable the form continues in offline mode and sets a temporary local ID.If a visit record for the chosen date already exists the backend returns HTTP 400. The service treats this as a success and reuses the existing record.
Select tickets
Available tickets are fetched from the public endpoint via The Use
getAvailableTickets(). Each ticket has a name, price, currency (CRC or USD), and available slot count. The visitor selects quantities; validateTicketAvailability() checks stock in real time before allowing the user to proceed.Tickets Django model defines the ticket catalogue:calculatePurchaseTotal() to compute the order total before showing the summary:Enter personal details
The visitor provides their full name and email address. The email is the only identifier for anonymous purchases — it is stored on the order and used to send the invoice. Format is validated with
/^[^\s@]+@[^\s@]+\.[^\s@]+$/ before the request is sent.The visitor also chooses a payment method at this step. Available methods are loaded from getPaymentMethods().Payment
The form renders the appropriate payment component based on the method selected in the previous step.The service maps numeric IDs to backend strings before submission:
- Card (CARD)
- PayPal (PAYPAL)
- SINPE / Cash (CASH)
Visa and Mastercard are handled by the
CardPayment component. The payment method string sent to the backend is "CARD".Confirmation and QR code
On successful payment The backend creates the purchase order with The QR payload includes a SHA-256 verification hash:An invoice email is then dispatched via EmailJS with the confirmation code, order details, and a link to the QR image. The purchase is considered complete even if the email step fails.
createAnonymousPurchase() sends the complete order to the backend:user = null and is_anonymous = true, then fires a Django signal that generates a QR code automatically:Importing the service
Anonymous purchase request body
QR validation endpoints
Purchase order model
Payment methods summary
| Method | Backend string | Component |
|---|---|---|
| Visa / Mastercard | CARD | CardPayment |
| PayPal | PAYPAL | PaypalPayment |
| SINPE Móvil | CASH | CashPayment |
| Efectivo | CASH | CashPayment |
